<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>携程伸缩布局</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        html,body{
            width: 100%;
            height: 100%;
        }

        .header{
            width: 100%;
            display: flex;
        }

        .header .a{
            flex: 1;
        }

        .header img{
            width: 100%;
        }

        .content{
            display: flex;
            flex-direction: column;
            padding: 10px;
        }

        .public{
            flex: 1;
            height: 100px;
            margin: 5px;
            border-radius: 5px;
            display: flex;
            flex-direction:row;
        }

        .public>div{
            flex: 1;
            border-right: 1px solid #FFF;
        }


        .public>div:last-child{
            border:0 none;
        }

        .top{
            height: 50px;
            text-align: center;
            line-height: 50px;
            border-bottom: 1px solid #FFF;
        }

        .bot{
            height: 50px;
            text-align: center;
            line-height: 50px;
        }
        
        .public:nth-child(1){
            background-color: rgb(219, 138, 208);
        }

        .public:nth-child(2){
            background-color: rgba(29, 143, 219);
        }

        .public:nth-child(3){
            background-color: rgb(8, 82, 34);
        }

        .public:nth-child(4){
            background-color: rgb(240, 146, 5);
        }

        .footer{
            display: flex;
            flex-direction: column;
        }

        .footer .imgs{
            flex: 1;
            display: flex;
        }

        .imgs a{
            flex: 1;
        }

        .imgs a img{
            width: 100%;
        }

        .footer .link{
            flex: 1;
            display: flex;
            height: 50px;
            border-top: 1px solid #ccc;
        }

        .link a{
            flex:1;
            text-align: center;
            line-height: 50px;
        }
    </style>
</head>
<body>
    <!-- 头部开始 -->
    <div class="header">
        <a href="#">
            <img src="./img/banner.jpg" alt="">
        </a>
    </div>
    <!-- 头部结束 -->

    <!-- 主体开始 -->
    <div class="content">
        <div class="public">
            <div class="left"></div>
            <div class="middle">
                <div class="top">首页</div>
                <div class="bot">携程旅游</div>
            </div>
            <div class="right">
                <div class="top">联系我们</div>
                <div class="bot">关于我们</div>
            </div>
        </div>
        <div class="public">
            <div class="left"></div>
            <div class="middle">
                <div class="top">首页</div>
                <div class="bot">携程旅游</div>
            </div>
            <div class="right">
                <div class="top">联系我们</div>
                <div class="bot">关于我们</div>
            </div>
        </div>
        <div class="public">
            <div class="left"></div>
            <div class="middle">
                <div class="top">首页</div>
                <div class="bot">携程旅游</div>
            </div>
            <div class="right">
                <div class="top">联系我们</div>
                <div class="bot">关于我们</div>
            </div>
        </div>
        <div class="public">
            <div class="left">
                <div class="top">首页</div>
                <div class="bot">携程旅游</div>
            </div>
            <div class="middle">
                <div class="top">首页</div>
                <div class="bot">携程旅游</div>
            </div>
            <div class="right">
                <div class="top">联系我们</div>
                <div class="bot">关于我们</div>
            </div>
        </div>
    </div>
    <!-- 主体结束 -->

    <!-- 底部开始 -->
    <div class="footer">
        <div class="imgs">
            <a href="#"><img src="./img/extra_1.png" alt=""></a>
            <a href="#"><img src="./img/extra_2.png" alt=""></a>
        </div>
        <div class="link">
            <a href="#">联系我们</a>
            <a href="#">联系我们</a>
            <a href="#">联系我们</a>
        </div>
    </div>
    <!-- 底部结束 -->
</body>
</html>